import {
  RecommendUnionType,
  GET_RECOMMEND_LIST_SUCCESS,
  IRecommendItem,
} from "../actions/recommend.action";

const initialState: IRecommendItem[] = [];

export default function recommendListReducer(
  state = initialState,
  action: RecommendUnionType
) {
  switch (action.type) {
    case GET_RECOMMEND_LIST_SUCCESS:
      return action.payload.result;
    default:
      return state;
  }
}
